<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<title>title</title>
		<link rel="stylesheet" type="text/css" href="../css/api.css" />
		<link rel="stylesheet" type="text/css" href="../css/demo4_1.css" />
		<link rel="stylesheet" type="text/css" href="../css/public-head.css"/>
		<link rel="stylesheet" href="../css/mui.css" />
		<style>

		</style>
	</head>

	<body>
		<div id="addr_list">

		</div>
		<!-- 暂无订单 -->
		<!--<div class='noorder' wx:else>
			<div>
				<image src='https://ccx-mini.oss-cn-shenzhen.aliyuncs.com/static/orders/noorder.png'></image>
			</div>
			<div>暂无信息</div>
		</div>-->
	</body>
	<script type="text/javascript " src="../script/api.js "></script>
	<script type="text/javascript" src="../script/mui.js"></script>
	<script type="text/javascript" src="../script/public-head.js"></script>
	<script src="../script/template-web.js"></script>

	<script type="text/html" id="list">
		{{each data value index}}
		<div class='context-view'>
			<div class='item-view'>
				<div class='shop-img-view'>
					<image class='shop-img' src='../image/icon/ysg1@2x.png' alt="" />
				</div>
				<div class='shop-info-view'>
					<div class='shop-info-name'>钥匙柜地址:{{value.addr}}</div>
					<div class='shop-info-yu'>当前钥匙柜有 {{value.port_nums}}个空位</div>
				</div>
			</div>
		</div>
		{{/each}}
	</script>
	<script type="text/javascript ">
		//头部
		headInner({
			title: "门店钥匙柜",
			//headleft
			headl: '<a href="#" style="color:white" class="mui-icon mui-icon-left-nav" tapmode onclick="api.closeWin()"></a>',
			//headright
			headr: '<a style="color:white"></a>',
			color: "", //默认是蓝色
			padding: "0px 0px 0px",
		})
		var addr_list = {
			"data": [{
				"addr": "1号柜 ",
				"address": " ",
				"contact": " ",
				"deviceType": "desktop ",
				"id": 2,
				"imei": "867732032893778 ",
				"port_nums": 20,
				"shop_id": 7,
				"used_nums": 0
			}, {
				"addr": "2号柜 ",
				"address": " ",
				"contact": " ",
				"deviceType": "desktop ",
				"id": 2,
				"imei": "867732032893776 ",
				"port_nums": 5,
				"shop_id": 7,
				"used_nums": 0
			}, {
				"addr": "3号柜 ",
				"address": " ",
				"contact": " ",
				"deviceType": "desktop ",
				"id": 2,
				"imei": "867732032893775 ",
				"port_nums": 10,
				"shop_id": 7,
				"used_nums": 0
			}]
		}
		apiready = function() {
			cabinet()
		};
		//附近钥匙柜列表
		function cabinet() {
			var html = template('list', addr_list);
			//实际位置
			document.getElementById('addr_list').innerHTML = html;
		}
	</script>

</html>
